<include file="public@header"/>
</head>
<body>
<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--页面主要内容-->
        <main class="lyear-layout-content">
          
            <div class="container-fluid">
            
                <div class="row">
                   <div class="col-md-12">
                        <div class="card">
                            <ul class="nav nav-tabs">
                                <li class="active"><a href="{:url('AdminTag/index')}">标签管理</a></li>
                                <li><a href="{:url('AdminTag/add')}">添加标签</a></li>
                            </ul>
                            <div class="card-body js-check-wrap">
                                <form method="post" class="js-ajax-form margin-top-20">
                                    <div class="table-actions">
                                        <!--<button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>-->
                                    </div>
                                    <table class="table table-hover">
                                        <thead>
                                        <tr>
                                            <th width="50">ID</th>
                                            <th>标签名称</th>
                                            <th>状态</th>
                                            <th width="160">操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <foreach name="tags" item="vo">
                                            <tr>
                                                <td>{$vo.id}</td>
                                                <td>{$vo.name}</td>
                                                <td>{$arrStatus[$vo['status']]}</td>
                                                <td>
                                                    <if condition="$vo['status'] eq 1">
                                                        <a class="btn btn-xs btn-warning js-ajax-dialog-btn"
                                                           href="{:url('AdminTag/upStatus',['id'=>$vo['id'],'status'=>0])}">禁用</a>
                                                        <else/>
                                                        <a class="btn btn-xs btn-success js-ajax-dialog-btn"
                                                           href="{:url('AdminTag/upStatus',['id'=>$vo['id'] ,'status'=>1])}">启用</a>
                                                    </if>
                                                    <a class="btn btn-xs btn-danger js-ajax-delete"
                                                       href="{:url('AdminTag/delete',['id'=>$vo['id']])}">删除</a>
                                                </td>
                                            </tr>
                                        </foreach>
                                        </tbody>
                                        <tfoot>
                                        <tr>
                                            <th width="50">ID</th>
                                            <th>标签名称</th>
                                            <th>状态</th>
                                            <th width="160">操作</th>
                                        </tr>
                                        </tfoot>
                                    </table>
                                    <div class="table-actions">
                                        <!--<button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>-->
                                    </div>
                                </form>
                                <ul class="pagination">{$page|default=''}</ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>
</div>
<script src="__TMPL__/public/assets/js/admin.js"></script>
</body>
</html>